import Vue from 'vue'
import VueI18n from 'vue-i18n'
import zh from "./zh"
import en from "./en"
import zhLocal from "element-ui/lib/locale/lang/zh-CN"
import enLocal from "element-ui/lib/locale/lang/en"

Vue.use(VueI18n)

const lang = {
    'zh-CN': Object.assign(zh, zhLocal),
    'en-US': Object.assign(en, enLocal)
}

const i18n = new VueI18n({
    locale: localStorage.getItem("lang_damopan") || "zh-CN",
    messages: lang
})

export default i18n